<html>
<head><meta charset="utf-8"><title>Auto-deref in completion scoring · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref.20in.20completion.20scoring.html">Auto-deref in completion scoring</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230153651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref%20in%20completion%20scoring/near/230153651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ivan770 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref.20in.20completion.20scoring.html#230153651">(Mar 13 2021 at 10:26)</a>:</h4>
<p>When trying to reproduce issue, I'm stuck with auto-deref fields being treated as exact matches without any code changes. <code>test</code> expects string slice, and <code>inner_str</code> is the first one under caret no matter what. <a href="/user_uploads/4715/6zVlzP9yM27hPzLVvC8DZkUg/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/6zVlzP9yM27hPzLVvC8DZkUg/image.png" title="image.png"><img src="/user_uploads/4715/6zVlzP9yM27hPzLVvC8DZkUg/image.png"></a></div>



<a name="230153672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref%20in%20completion%20scoring/near/230153672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ivan770 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref.20in.20completion.20scoring.html#230153672">(Mar 13 2021 at 10:27)</a>:</h4>
<p>Exact issue is <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7982">https://github.com/rust-analyzer/rust-analyzer/issues/7982</a></p>



<a name="230154523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref%20in%20completion%20scoring/near/230154523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref.20in.20completion.20scoring.html#230154523">(Mar 13 2021 at 10:46)</a>:</h4>
<p>I think what the issue is talking about is that e.g. <code>String</code> should be treated as a type match for <code>str</code>?</p>



<a name="230155837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref%20in%20completion%20scoring/near/230155837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ivan770 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Auto-deref.20in.20completion.20scoring.html#230155837">(Mar 13 2021 at 11:13)</a>:</h4>
<p>Thanks! Finally got reproduced and fixed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>